/**
 * 页面展示字段注释
 */
$(function () {
    $.ajax({
        url: "../../QueryFieldAnnotations/selectPtientInformationSheet",
        type: "post",
        dataType: "json",
        success: function (map) {
            var spanStr = "";
            var patient = map.patient;
            /**
             * 基本信息
             */
            for (var i = 0; i < patient.length; i++) {
                if (i == 0) {
                    spanStr += "<a href=\"#\">"
                    spanStr += "<i class=\"fa fa-folder\"></i>"
                    spanStr += "<span><input type='checkbox' id='patients" + i + "' class='ids' name='patients' value='ids,基本信息'/><label for='patients" + i + "'>基本信息</label></span>"
                    spanStr += " </a>"
                } else if (patient[i].column_comment.lastIndexOf("id") == -1) {
                    if( patient[i].columnName.indexOf("patient_name") != -1 ){
                        spanStr += "<a href=\"#\">"
                        spanStr += "<i class=\"fa fa-folder\"></i>"
                        var indexState = patient[i].column_comment.indexOf("（");
                        var indexEnd = patient[i].column_comment.lastIndexOf("）");
                        var columnComment = patient[i].column_comment.substring(indexState, indexEnd + 1);
                        spanStr += "<span><input type='checkbox' checked id='patients" + i + "'name='patients' class='" + patient[i].columnName + "' value='" + patient[i].columnName + "," + patient[i].column_comment.replace(columnComment, '') + "'/><label for='patients" + i + "'>" + patient[i].column_comment.replace(columnComment, '') + "</label></span>"
                        spanStr += "<i class=\"fa fa-folder\"></i>"
                        spanStr += "<span class=\"pull-right-container\">"
                        spanStr += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr += " </a>"
                    }else if( patient[i].columnName.indexOf("number") != -1 ){
                        spanStr += "<a href=\"#\">"
                        spanStr += "<i class=\"fa fa-folder\"></i>"
                        var indexState = patient[i].column_comment.indexOf("（");
                        var indexEnd = patient[i].column_comment.lastIndexOf("）");
                        var columnComment = patient[i].column_comment.substring(indexState, indexEnd + 1);
                        spanStr += "<span><input type='checkbox' checked id='patients" + i + "'name='patients' class='" + patient[i].columnName + "' value='" + patient[i].columnName + "," + patient[i].column_comment.replace(columnComment, '') + "'/><label for='patients" + i + "'>" + patient[i].column_comment.replace(columnComment, '') + "</label></span>"
                        spanStr += "<i class=\"fa fa-folder\"></i>"
                        spanStr += "<span class=\"pull-right-container\">"
                        spanStr += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr += " </a>"
                    }else {
                        spanStr += "<a href=\"#\">"
                        spanStr += "<i class=\"fa fa-folder\"></i>"
                        var indexState = patient[i].column_comment.indexOf("（");
                        var indexEnd = patient[i].column_comment.lastIndexOf("）");
                        var columnComment = patient[i].column_comment.substring(indexState, indexEnd + 1);
                        spanStr += "<span><input type='checkbox' id='patients" + i + "'name='patients' class='" + patient[i].columnName + "' value='" + patient[i].columnName + "," + patient[i].column_comment.replace(columnComment, '') + "'/><label for='patients" + i + "'>" + patient[i].column_comment.replace(columnComment, '') + "</label></span>"
                        spanStr += "<i class=\"fa fa-folder\"></i>"
                        spanStr += "<span class=\"pull-right-container\">"
                        spanStr += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr += " </a>"
                    }
                } else {
                    spanStr += "<a href=\"#\">"
                    spanStr += "<i class=\"fa fa-folder\"></i>"
                    spanStr += "<span><input type='checkbox' name='patients' id='patients" + i + "' class='" + patient[i].columnName + "' value='" + patient[i].columnName + "," + patient[i].column_comment.replace('id', '') + "' /><label for='patients" + i + "'>" + patient[i].column_comment.replace('id', '') + "</label></span>"
                    spanStr += "<i class=\"fa fa-folder\"></i>"
                    spanStr += "<span class=\"pull-right-container\">"
                    spanStr += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr += " </a>"
                }
            }
            $("#patient").html(spanStr);

            /**
             * 联系人
             */
            var spanStr1 = "";
            var patientsFamily = map.patientsFamily;
            for (var i = 0; i < patientsFamily.length; i++) {
                if (i == 0) {
                    spanStr1 += "<a href=\"#\">"
                    spanStr1 += "<i class=\"fa fa-folder\"></i>"
                    spanStr1 += "<span><input type='checkbox' id='patientsFamily" + i + "' class='ids' name='patients' value='ids,联系人'/><label for='patientsFamily" + i + "'>联系人</label></span>"
                    spanStr1 += " </a>"
                } else if (patientsFamily[i].column_comment.indexOf("id") == -1) {
                    spanStr1 += "<a href=\"#\">"
                    spanStr1 += "<i class=\"fa fa-folder\"></i>"
                    spanStr1 += "<span><input type='checkbox' id='patientsFamily" + i + "' class='" + patientsFamily[i].columnName + "' name='patients' value='" + patientsFamily[i].columnName + "," + patientsFamily[i].column_comment + "'/><label for='patientsFamily" + i + "'> " + patientsFamily[i].column_comment + "</label></span>"
                    spanStr1 += "<i class=\"fa fa-folder\"></i>"
                    spanStr1 += "<span class=\"pull-right-container\">"
                    spanStr1 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr1 += " </a>"
                } else {
                    if (patientsFamily[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStr1 += "<a href=\"#\">"
                        spanStr1 += "<i class=\"fa fa-folder\"></i>"
                        spanStr1 += "<span><input type='checkbox' id='patientsFamily" + i + "' class='" + patientsFamily[i].columnName + "'  name='patients' value='" + patientsFamily[i].columnName + "," + patientsFamily[i].column_comment.replace('id', '') + "'/><label for='patientsFamily" + i + "'> " + patientsFamily[i].column_comment.replace('id', '') + "</label></span>"
                        spanStr1 += "<i class=\"fa fa-folder\"></i>"
                        spanStr1 += "<span class=\"pull-right-container\">"
                        spanStr1 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr1 += " </a>"
                    }
                }
            }
            $("#patientsFamily").html(spanStr1);
            /**
             * 证件
             */
            var spanStr2 = "";
            var certificate = map.certificate;
            for (var i = 0; i < certificate.length; i++) {
                if (i == 0) {
                    spanStr2 += "<a href=\"#\">"
                    spanStr2 += "<i class=\"fa fa-folder\"></i>"
                    spanStr2 += "<span><input type='checkbox' id='certificate" + i + "' class='ids' name='patients' value='ids,证件'/><label for='certificate" + i + "'>证件</label></span>"
                    spanStr2 += " </a>"
                } else if (certificate[i].column_comment.lastIndexOf("id") == -1) {
                    spanStr2 += "<a href=\"#\">"
                    spanStr2 += "<i class=\"fa fa-folder\"></i>"
                    spanStr2 += "<span><input type='checkbox' id='certificate" + i + "' class='" + certificate[i].columnName + "'  name='patients' value='" + certificate[i].columnName + "," + certificate[i].column_comment + "'/><label for='certificate" + i + "'>" + certificate[i].column_comment + "</label></span>"
                    spanStr2 += "<i class=\"fa fa-folder\"></i>"
                    spanStr2 += "<span class=\"pull-right-container\">"
                    spanStr2 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr2 += " </a>"
                } else {
                    if (certificate[i].column_comment.indexOf("family_id") == -1 && certificate[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStr2 += "<a href=\"#\">"
                        spanStr2 += "<i class=\"fa fa-folder\"></i>"
                        spanStr2 += "<span><input type='checkbox' id='certificate" + i + "' class='" + certificate[i].columnName + "' name='patients' value='" + certificate[i].columnName + "," + certificate[i].column_comment.replace('id', '') + "'/><label for='certificate" + i + "'>" + certificate[i].column_comment.replace('id', '') + "</label></span>"
                        spanStr2 += "<i class=\"fa fa-folder\"></i>"
                        spanStr2 += "<span class=\"pull-right-container\">"
                        spanStr2 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr2 += " </a>"
                    }
                }
            }
            $("#certificate").html(spanStr2);
            /**
             * 手术信息
             */
            var spanStr3 = "";
            var operationInformationSheet = map.operationInformationSheet;
            for (var i = 0; i < operationInformationSheet.length; i++) {
                if (i == 0) {
                    spanStr3 += "<a href=\"#\">"
                    spanStr3 += "<i class=\"fa fa-folder\"></i>"
                    spanStr3 += "<span><input type='checkbox' id='operationInformationSheet" + i + "' class='ids' name='patients' value='ids,手术信息'/><label for='operationInformationSheet" + i + "'> 手术信息</label></span>"
                    spanStr3 += " </a>"
                } else if (operationInformationSheet[i].column_comment.lastIndexOf("id") == -1) {
                    spanStr3 += "<a href=\"#\">"
                    spanStr3 += "<i class=\"fa fa-folder\"></i>"
                    spanStr3 += "<span><input type='checkbox' id='operationInformationSheet" + i + "' class='" + operationInformationSheet[i].columnName + "' name='patients' value='" + operationInformationSheet[i].columnName + "," + operationInformationSheet[i].column_comment + "'/><label for='operationInformationSheet" + i + "'>" + operationInformationSheet[i].column_comment + "</label></span>"
                    spanStr3 += "<i class=\"fa fa-folder\"></i>"
                    spanStr3 += "<span class=\"pull-right-container\">"
                    spanStr3 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr3 += " </a>"
                } else {
                    if (operationInformationSheet[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStr3 += "<a href=\"#\">"
                        spanStr3 += "<i class=\"fa fa-folder\"></i>"
                        spanStr3 += "<span><input type='checkbox' id='operationInformationSheet" + i + "' class='" + operationInformationSheet[i].columnName + "' name='patients' value='" + operationInformationSheet[i].columnName + "," + operationInformationSheet[i].column_comment.replace('id', '') + "' /><label for='operationInformationSheet" + i + "'>" + operationInformationSheet[i].column_comment.replace('id', '') + "</label></span>"
                        spanStr3 += "<i class=\"fa fa-folder\"></i>"
                        spanStr3 += "<span class=\"pull-right-container\">"
                        spanStr3 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr3 += " </a>"
                    }
                }
            }
            $("#operationInformationSheet").html(spanStr3);
            /**
             * 首页信息
             */
            var spanStr4 = "";
            var diagnosis = map.diagnosis;
            for (var i = 0; i < diagnosis.length; i++) {
                if (i == 0) {
                    spanStr4 += "<a href=\"#\">"
                    spanStr4 += "<i class=\"fa fa-folder\"></i>"
                    spanStr4 += "<span><input type='checkbox' id='diagnosis" + i + "' class='ids' name='patients' value='ids,首页信息'/><label for='diagnosis" + i + "'> 首页信息</label></span>"
                    spanStr4 += " </a>"
                } else if (diagnosis[i].column_comment.lastIndexOf("id") == -1) {
                    if(diagnosis[i].columnName.indexOf("outpatient_service_no")!=-1){
                        spanStr4 += "<a href=\"#\">"
                        spanStr4 += "<i class=\"fa fa-folder\"></i>"
                        var indexState = diagnosis[i].column_comment.indexOf("（");
                        var indexEnd = diagnosis[i].column_comment.lastIndexOf("）");
                        var columnComment = diagnosis[i].column_comment.substring(indexState, indexEnd + 1);
                        spanStr4 += "<span><input type='checkbox' checked id='diagnosis" + i + "' class='" + diagnosis[i].columnName + "' name='patients' value='" + diagnosis[i].columnName + "," + diagnosis[i].column_comment.replace(columnComment, '') + "'/><label for='diagnosis" + i + "'>" + diagnosis[i].column_comment.replace(columnComment, '') + "</label></span>"
                        spanStr4 += "<i class=\"fa fa-folder\"></i>"
                        spanStr4 += "<span class=\"pull-right-container\">"
                        spanStr4 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr4 += " </a>"
                    }else if(diagnosis[i].columnName.indexOf("hospital_number")!=-1){
                        spanStr4 += "<a href=\"#\">"
                        spanStr4 += "<i class=\"fa fa-folder\"></i>"
                        var indexState = diagnosis[i].column_comment.indexOf("（");
                        var indexEnd = diagnosis[i].column_comment.lastIndexOf("）");
                        var columnComment = diagnosis[i].column_comment.substring(indexState, indexEnd + 1);
                        spanStr4 += "<span><input type='checkbox' checked id='diagnosis" + i + "' class='" + diagnosis[i].columnName + "' name='patients' value='" + diagnosis[i].columnName + "," + diagnosis[i].column_comment.replace(columnComment, '') + "'/><label for='diagnosis" + i + "'>" + diagnosis[i].column_comment.replace(columnComment, '') + "</label></span>"
                        spanStr4 += "<i class=\"fa fa-folder\"></i>"
                        spanStr4 += "<span class=\"pull-right-container\">"
                        spanStr4 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr4 += " </a>"
                    }else{
                        spanStr4 += "<a href=\"#\">"
                        spanStr4 += "<i class=\"fa fa-folder\"></i>"
                        var indexState = diagnosis[i].column_comment.indexOf("（");
                        var indexEnd = diagnosis[i].column_comment.lastIndexOf("）");
                        var columnComment = diagnosis[i].column_comment.substring(indexState, indexEnd + 1);
                        spanStr4 += "<span><input type='checkbox' id='diagnosis" + i + "' class='" + diagnosis[i].columnName + "' name='patients' value='" + diagnosis[i].columnName + "," + diagnosis[i].column_comment.replace(columnComment, '') + "'/><label for='diagnosis" + i + "'>" + diagnosis[i].column_comment.replace(columnComment, '') + "</label></span>"
                        spanStr4 += "<i class=\"fa fa-folder\"></i>"
                        spanStr4 += "<span class=\"pull-right-container\">"
                        spanStr4 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr4 += " </a>"
                    }
                } else {
                    if (diagnosis[i].column_comment.indexOf("patientInformationSheet_id") == -1) {
                    } else {
                        spanStr4 += "<a href=\"#\">"
                        spanStr4 += "<i class=\"fa fa-folder\"></i>"
                        spanStr4 += "<span><input type='checkbox' id='diagnosis" + i + "' class='" + diagnosis[i].columnName + "' name='patients' value='" + diagnosis[i].columnName + "," + diagnosis[i].column_comment.replace('id', '') + "'/><label for='diagnosis" + i + "'>" + diagnosis[i].column_comment.replace('id', '') + "</label></span>"
                        spanStr4 += "<i class=\"fa fa-folder\"></i>"
                        spanStr4 += "<span class=\"pull-right-container\">"
                        spanStr4 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr4 += " </a>"
                    }
                }
            }
            $("#diagnosis").html(spanStr4);

            /**
             * 麻醉信息
             */
            var spanStr5 = "";
            var anesthesiaInformation = map.anesthesiaInformation;
            for (var i = 0; i < anesthesiaInformation.length; i++) {
                if (i == 0) {
                    spanStr5 += "<a href=\"#\">"
                    spanStr5 += "<i class=\"fa fa-folder\"></i>"
                    spanStr5 += "<span><input type='checkbox' id='anesthesiaInformation" + i + "' class='ids' name='patients' value='ids,麻醉信息'/><label for='anesthesiaInformation\"+ i + \"'> 麻醉信息</label></span>"
                    spanStr5 += " </a>"
                } else if (anesthesiaInformation[i].column_comment.lastIndexOf("id") == -1) {
                    spanStr5 += "<a href=\"#\">"
                    spanStr5 += "<i class=\"fa fa-folder\"></i>"
                    spanStr5 += "<span><input type='checkbox' id='anesthesiaInformation" + i + "' class='" + anesthesiaInformation[i].columnName + "' name='patients' value='" + anesthesiaInformation[i].columnName + "," + anesthesiaInformation[i].column_comment + "'/><label for='anesthesiaInformation" + i + "'>" + anesthesiaInformation[i].column_comment + "</label></span>"
                    spanStr5 += "<i class=\"fa fa-folder\"></i>"
                    spanStr5 += "<span class=\"pull-right-container\">"
                    spanStr5 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr5 += " </a>"
                } else {
                    spanStr5 += "<a href=\"#\">"
                    spanStr5 += "<i class=\"fa fa-folder\"></i>"
                    spanStr5 += "<span><input type='checkbox' id='anesthesiaInformation" + i + "'class='" + anesthesiaInformation[i].columnName + "' name='patients' value='" + anesthesiaInformation[i].columnName + "," + anesthesiaInformation[i].column_comment.replace('id', '') + "'/><label for='anesthesiaInformation" + i + "'>" + anesthesiaInformation[i].column_comment.replace('id', '') + "</label></span>"
                    spanStr5 += "<i class=\"fa fa-folder\"></i>"
                    spanStr5 += "<span class=\"pull-right-container\">"
                    spanStr5 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr5 += " </a>"
                }
            }
            //展示页面
            $("#anesthesiaInformation").html(spanStr5);

            /**
             * 用药,健康状态-输血信息
             */
            var bloodTransfusionRecord = map.bloodTransfusionRecord;
            var htmlBloodTransfusionRecord = "";
            for (var i = 0; i < bloodTransfusionRecord.length; i++) {
                if (i == 0) {
                    htmlBloodTransfusionRecord += "<a href=\"#\">"
                    htmlBloodTransfusionRecord += "<i class=\"fa fa-folder\"></i>"
                    htmlBloodTransfusionRecord += "<span><input type='checkbox' id='bloodTransfusionRecord" + i + "' class='ids' name='patients' value='ids,输血'/><label for='bloodTransfusionRecord\"+ i + \"'> 输血</label></span>"
                    htmlBloodTransfusionRecord += " </a>"
                } else if (bloodTransfusionRecord[i].column_comment.lastIndexOf("id") == -1) {
                    htmlBloodTransfusionRecord += "<a href=\"#\">"
                    htmlBloodTransfusionRecord += "<i class=\"fa fa-folder\"></i>"
                    var indexState = bloodTransfusionRecord[i].column_comment.indexOf("（");
                    var indexEnd = bloodTransfusionRecord[i].column_comment.lastIndexOf("）");
                    var columnComment = bloodTransfusionRecord[i].column_comment.substring(indexState, indexEnd + 1);
                    htmlBloodTransfusionRecord += "<span><input type='checkbox' id='bloodTransfusionRecord" + i + "' class='" + bloodTransfusionRecord[i].columnName + "' name='patients' value='" + bloodTransfusionRecord[i].columnName + "," + bloodTransfusionRecord[i].column_comment.replace(columnComment, '') + "'/><label for='bloodTransfusionRecord" + i + "'>" + bloodTransfusionRecord[i].column_comment.replace(columnComment, '') + "</label></span>"
                    htmlBloodTransfusionRecord += "<i class=\"fa fa-folder\"></i>"
                    htmlBloodTransfusionRecord += "<span class=\"pull-right-container\">"
                    htmlBloodTransfusionRecord += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    htmlBloodTransfusionRecord += " </a>"
                } else {
                    if (bloodTransfusionRecord[i].column_comment.indexOf("patientInformationSheet_id") == -1) {
                    } else {
                        spanStr5 += "<a href=\"#\">"
                        spanStr5 += "<i class=\"fa fa-folder\"></i>"
                        spanStr5 += "<span><input type='checkbox' id='bloodTransfusionRecord" + i + "'class='" + bloodTransfusionRecord[i].columnName + "' name='patients' value='" + bloodTransfusionRecord[i].columnName + "," + bloodTransfusionRecord[i].column_comment.replace('id', '') + "'/><label for='bloodTransfusionRecord" + i + "'>" + bloodTransfusionRecord[i].column_comment.replace('id', '') + "</label></span>"
                        spanStr5 += "<i class=\"fa fa-folder\"></i>"
                        spanStr5 += "<span class=\"pull-right-container\">"
                        spanStr5 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr5 += " </a>"
                    }
                }
            }
            $("#medicationIds").html(htmlBloodTransfusionRecord);

            /**
             * 用药
             */
            var medicalInformation = map.medicalInformation;
            var htmlMedicalInformation = "";
            for (var i = 0; i < medicalInformation.length; i++) {
                if (i == 0) {
                    htmlMedicalInformation += "<a href=\"#\">"
                    htmlMedicalInformation += "<i class=\"fa fa-folder\"></i>"
                    htmlMedicalInformation += "<span><input type='checkbox' id='medicalInformation" + i + "' class='ids' name='patients' value='ids,用药'/><label for='medicalInformation\"+ i + \"'> 用药</label></span>"
                    htmlMedicalInformation += " </a>"
                } else if (medicalInformation[i].column_comment.lastIndexOf("id") == -1) {
                    htmlMedicalInformation += "<a href=\"#\">"
                    htmlMedicalInformation += "<i class=\"fa fa-folder\"></i>"
                    var indexState = medicalInformation[i].column_comment.indexOf("（");
                    var indexEnd = medicalInformation[i].column_comment.lastIndexOf("）");
                    var columnComment = medicalInformation[i].column_comment.substring(indexState, indexEnd + 1);
                    htmlMedicalInformation += "<span><input type='checkbox' id='medicalInformation" + i + "' class='" + medicalInformation[i].columnName + "' name='patients' value='" + medicalInformation[i].columnName + "," + medicalInformation[i].column_comment.replace(columnComment, '') + "'/><label for='medicalInformation" + i + "'>" + medicalInformation[i].column_comment.replace(columnComment, '') + "</label></span>"
                    htmlMedicalInformation += "<i class=\"fa fa-folder\"></i>"
                    htmlMedicalInformation += "<span class=\"pull-right-container\">"
                    htmlMedicalInformation += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    htmlMedicalInformation += " </a>"
                } else {
                    if (medicalInformation[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        htmlMedicalInformation += "<a href=\"#\">"
                        htmlMedicalInformation += "<i class=\"fa fa-folder\"></i>"
                        htmlMedicalInformation += "<span><input type='checkbox' id='medicalInformation" + i + "'class='" + medicalInformation[i].columnName + "' name='patients' value='" + medicalInformation[i].columnName + "," + medicalInformation[i].column_comment.replace('id', '') + "'/><label for='medicalInformation" + i + "'>" + medicalInformation[i].column_comment.replace('id', '') + "</label></span>"
                        htmlMedicalInformation += "<i class=\"fa fa-folder\"></i>"
                        htmlMedicalInformation += "<span class=\"pull-right-container\">"
                        htmlMedicalInformation += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        htmlMedicalInformation += " </a>"
                    }
                }
            }
            $("#medicationId").html(htmlMedicalInformation);

            /**
             * 体格检查，贫血
             */
            var anemia = map.anemia;
            var spanStr6 = "";
            for (var i = 0; i < anemia.length; i++) {
                if (i == 0) {
                    spanStr6 += "<a href=\"#\">"
                    spanStr6 += "<i class=\"fa fa-folder\"></i>"
                    spanStr6 += "<span><input type='checkbox' id='anemia" + i + "' class='ids' name='patients' value='ids,体格检查'/><label for='anemia" + i + "'> 体格检查</label></span>"
                    spanStr6 += " </a>"
                } else if (anemia[i].column_comment.lastIndexOf("id") == -1) {
                    spanStr6 += "<a href=\"#\">"
                    spanStr6 += "<i class=\"fa fa-folder\"></i>"
                    var indexState = anemia[i].column_comment.indexOf("（");
                    var indexEnd = anemia[i].column_comment.lastIndexOf("）");
                    var columnComment = anemia[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStr6 += "<span><input type='checkbox' id='anemia" + i + "'name='patients' class='" + anemia[i].columnName + "' value='" + anemia[i].columnName + "," + anemia[i].column_comment.replace(columnComment, '') + "'/><label for='anemia" + i + "'>" + anemia[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStr6 += "<i class=\"fa fa-folder\"></i>"
                    spanStr6 += "<span class=\"pull-right-container\">"
                    spanStr6 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr6 += " </a>"
                } else {
                    if (anemia[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStr6 += "<a href=\"#\">"
                        spanStr6 += "<i class=\"fa fa-folder\"></i>"
                        spanStr6 += "<span><input type='checkbox' name='patients' id='anemia" + i + "' class='" + anemia[i].columnName + "' value='" + anemia[i].columnName + "," + anemia[i].column_comment.replace('id', '') + "' /><label for='anemia" + i + "'>" + anemia[i].column_comment.replace('id', '') + "</label></span>"
                        spanStr6 += "<i class=\"fa fa-folder\"></i>"
                        spanStr6 += "<span class=\"pull-right-container\">"
                        spanStr6 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr6 += " </a>"
                    }
                }
            }

            /**
             * 体格检查，体征血
             */
            var signsOfBlood = map.signsOfBlood;
            for (var i = 0; i < signsOfBlood.length; i++) {
                if (i == 0) {
                    spanStr6 += "<a href=\"#\">"
                    spanStr6 += "<i class=\"fa fa-folder\"></i>"
                    spanStr6 += "<span><input type='checkbox' id='anemias" + i + "' class='ids' name='patients' value='ids,体征血'/><label for='anemias" + i + "'> 体征血</label></span>"
                    spanStr6 += " </a>"
                } else if (signsOfBlood[i].column_comment.lastIndexOf("id") == -1) {
                    spanStr6 += "<a href=\"#\">"
                    spanStr6 += "<i class=\"fa fa-folder\"></i>"
                    var indexState = signsOfBlood[i].column_comment.indexOf("（");
                    var indexEnd = signsOfBlood[i].column_comment.lastIndexOf("）");
                    var columnComment = signsOfBlood[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStr6 += "<span><input type='checkbox' id='anemias" + i + "'name='patients' class='" + signsOfBlood[i].columnName + "' value='" + signsOfBlood[i].columnName + "," + signsOfBlood[i].column_comment.replace(columnComment, '') + "'/><label for='anemias" + i + "'>" + signsOfBlood[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStr6 += "<i class=\"fa fa-folder\"></i>"
                    spanStr6 += "<span class=\"pull-right-container\">"
                    spanStr6 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr6 += " </a>"
                } else {
                    if (signsOfBlood[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStr6 += "<a href=\"#\">"
                        spanStr6 += "<i class=\"fa fa-folder\"></i>"
                        spanStr6 += "<span><input type='checkbox' name='patients' id='anemias" + i + "' class='" + signsOfBlood[i].columnName + "' value='" + signsOfBlood[i].columnName + "," + signsOfBlood[i].column_comment.replace('id', '') + "' /><label for='anemias" + i + "'>" + signsOfBlood[i].column_comment.replace('id', '') + "</label></span>"
                        spanStr6 += "<i class=\"fa fa-folder\"></i>"
                        spanStr6 += "<span class=\"pull-right-container\">"
                        spanStr6 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr6 += " </a>"
                    }
                }
            }
            $("#anemia").html(spanStr6);

            /**
             * 实验室检查，化学物质接触式
             */
            var chemicalExposureHistory = map.chemicalExposureHistory;
            var spanStr7 = "";
            for (var i = 0; i < chemicalExposureHistory.length; i++) {
                if (i == 0) {
                    spanStr7 += "<a href=\"#\">"
                    spanStr7 += "<i class=\"fa fa-folder\"></i>"
                    spanStr7 += "<span><input type='checkbox' id='chemicalExposureHistory" + i + "' class='ids' name='patients' value='ids,实验室检查'/><label for='chemicalExposureHistory" + i + "'> 实验室检查</label></span>"
                    spanStr7 += " </a>"
                } else if (chemicalExposureHistory[i].column_comment.lastIndexOf("id") == -1) {
                    spanStr7 += "<a href=\"#\">"
                    spanStr7 += "<i class=\"fa fa-folder\"></i>"
                    var indexState = chemicalExposureHistory[i].column_comment.indexOf("（");
                    var indexEnd = chemicalExposureHistory[i].column_comment.lastIndexOf("）");
                    var columnComment = chemicalExposureHistory[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStr7 += "<span><input type='checkbox' id='chemicalExposureHistory" + i + "'name='patients' class='" + chemicalExposureHistory[i].columnName + "' value='" + chemicalExposureHistory[i].columnName + "," + chemicalExposureHistory[i].column_comment.replace(columnComment, '') + "'/><label for='chemicalExposureHistory" + i + "'>" + chemicalExposureHistory[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStr7 += "<i class=\"fa fa-folder\"></i>"
                    spanStr7 += "<span class=\"pull-right-container\">"
                    spanStr7 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr7 += " </a>"
                } else {
                    if (chemicalExposureHistory[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStr7 += "<a href=\"#\">"
                        spanStr7 += "<i class=\"fa fa-folder\"></i>"
                        spanStr7 += "<span><input type='checkbox' name='patients' id='chemicalExposureHistory" + i + "' class='" + chemicalExposureHistory[i].columnName + "' value='" + chemicalExposureHistory[i].columnName + "," + chemicalExposureHistory[i].column_comment.replace('id', '') + "' /><label for='chemicalExposureHistory" + i + "'>" + chemicalExposureHistory[i].column_comment.replace('id', '') + "</label></span>"
                        spanStr7 += "<i class=\"fa fa-folder\"></i>"
                        spanStr7 += "<span class=\"pull-right-container\">"
                        spanStr7 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr7 += " </a>"
                    }
                }
            }
            $("#chemicalExposureHistoryId").html(spanStr7);

            /**
             * 影像学检查，胸部影像学
             */
            var chestImaging = map.chestImaging;
            var spanStr8 = "";
            for (var i = 0; i < chestImaging.length; i++) {
                if (i == 0) {
                    spanStr8 += "<a href=\"#\">"
                    spanStr8 += "<i class=\"fa fa-folder\"></i>"
                    spanStr8 += "<span><input type='checkbox' id='chestImaging" + i + "' class='ids' name='patients' value='ids,影像学检查'/><label for='chestImaging" + i + "'> 影像学检查</label></span>"
                    spanStr8 += " </a>"
                } else if (chestImaging[i].column_comment.lastIndexOf("id") == -1) {
                    spanStr8 += "<a href=\"#\">"
                    spanStr8 += "<i class=\"fa fa-folder\"></i>"
                    var indexState = chestImaging[i].column_comment.indexOf("（");
                    var indexEnd = chestImaging[i].column_comment.lastIndexOf("）");
                    var columnComment = chestImaging[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStr8 += "<span><input type='checkbox' id='chestImaging" + i + "'name='patients' class='" + chestImaging[i].columnName + "' value='" + chestImaging[i].columnName + "," + chestImaging[i].column_comment.replace(columnComment, '') + "'/><label for='chestImaging" + i + "'>" + chestImaging[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStr8 += "<i class=\"fa fa-folder\"></i>"
                    spanStr8 += "<span class=\"pull-right-container\">"
                    spanStr8 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr8 += " </a>"
                } else {
                    if (chestImaging[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStr8 += "<a href=\"#\">"
                        spanStr8 += "<i class=\"fa fa-folder\"></i>"
                        spanStr8 += "<span><input type='checkbox' name='patients' id='chestImaging" + i + "' class='" + chestImaging[i].columnName + "' value='" + chestImaging[i].columnName + "," + chestImaging[i].column_comment.replace('id', '') + "' /><label for='chestImaging" + i + "'>" + chestImaging[i].column_comment.replace('id', '') + "</label></span>"
                        spanStr8 += "<i class=\"fa fa-folder\"></i>"
                        spanStr8 += "<span class=\"pull-right-container\">"
                        spanStr8 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr8 += " </a>"
                    }
                }
            }
            $("#chestImagingId").html(spanStr8);

            /**
             * 既往史，治疗史
             */
            var medicalHistory = map.medicalHistory;
            var spanStr9 = "";
            for (var i = 0; i < medicalHistory.length; i++) {
                if (i == 0) {
                    spanStr9 += "<a href=\"#\">"
                    spanStr9 += "<i class=\"fa fa-folder\"></i>"
                    spanStr9 += "<span><input type='checkbox' id='medicalHistory" + i + "' class='ids' name='patients' value='ids,既往史'/><label for='medicalHistory" + i + "'> 既往史</label></span>"
                    spanStr9 += " </a>"
                } else if (medicalHistory[i].column_comment.lastIndexOf("id") == -1) {
                    spanStr9 += "<a href=\"#\">"
                    spanStr9 += "<i class=\"fa fa-folder\"></i>"
                    var indexState = medicalHistory[i].column_comment.indexOf("（");
                    var indexEnd = medicalHistory[i].column_comment.lastIndexOf("）");
                    var columnComment = medicalHistory[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStr9 += "<span><input type='checkbox' id='medicalHistory" + i + "'name='patients' class='" + medicalHistory[i].columnName + "' value='" + medicalHistory[i].columnName + "," + medicalHistory[i].column_comment.replace(columnComment, '') + "'/><label for='medicalHistory" + i + "'>" + medicalHistory[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStr9 += "<i class=\"fa fa-folder\"></i>"
                    spanStr9 += "<span class=\"pull-right-container\">"
                    spanStr9 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStr9 += " </a>"
                } else {
                    if (medicalHistory[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStr9 += "<a href=\"#\">"
                        spanStr9 += "<i class=\"fa fa-folder\"></i>"
                        spanStr9 += "<span><input type='checkbox' name='patients' id='medicalHistory" + i + "' class='" + medicalHistory[i].columnName + "' value='" + medicalHistory[i].columnName + "," + medicalHistory[i].column_comment.replace('id', '') + "' /><label for='medicalHistory" + i + "'>" + medicalHistory[i].column_comment.replace('id', '') + "</label></span>"
                        spanStr9 += "<i class=\"fa fa-folder\"></i>"
                        spanStr9 += "<span class=\"pull-right-container\">"
                        spanStr9 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStr9 += " </a>"
                    }
                }
            }
            $("#medicalHistoryId").html(spanStr9);

            /**
             * 临床诊断
             */
            var diagnosticInformationSheet = map.diagnosticInformationSheet;
            var spanStrHtml = "";
            for (var i = 0; i < diagnosticInformationSheet.length; i++) {
                if (i == 0) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span><input type='checkbox' id='diagnosticInformationSheet" + i + "' class='ids' name='patients' value='ids,临床诊断'/><label for='diagnosticInformationSheet" + i + "'> 临床诊断</label></span>"
                    spanStrHtml += " </a>"
                } else if (diagnosticInformationSheet[i].column_comment.lastIndexOf("id") == -1) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span><input type='checkbox' id='diagnosticInformationSheet" + i + "' class='" + diagnosticInformationSheet[i].columnName + "' name='patients' value='" + diagnosticInformationSheet[i].columnName + "," + diagnosticInformationSheet[i].column_comment + "'/><label for='diagnosticInformationSheet" + i + "'>" + diagnosticInformationSheet[i].column_comment + "</label></span>"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span class=\"pull-right-container\">"
                    spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml += " </a>"
                } else {
                    if (diagnosticInformationSheet[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStrHtml += "<a href=\"#\">"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span><input type='checkbox' name='patients' id='diagnosticInformationSheet" + i + "' class='" + diagnosticInformationSheet[i].columnName + "' value='" + diagnosticInformationSheet[i].columnName + "," + diagnosticInformationSheet[i].column_comment.replace('id', '') + "' /><label for='diagnosticInformationSheet" + i + "'>" + diagnosticInformationSheet[i].column_comment.replace('id', '') + "</label></span>"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span class=\"pull-right-container\">"
                        spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStrHtml += " </a>"
                    }
                }
            }
            /**
             * 临床诊断,肺转移
             */
            var pulmonaryMetastasis = map.pulmonaryMetastasis;
            for (var i = 0; i < pulmonaryMetastasis.length; i++) {
                if (i == 0) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span><input type='checkbox' id='pulmonaryMetastasis" + i + "' class='ids' name='patients' value='ids,肺转移'/><label for='pulmonaryMetastasis" + i + "'> 肺转移</label></span>"
                    spanStrHtml += " </a>"
                } else if (pulmonaryMetastasis[i].column_comment.lastIndexOf("id") == -1) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    var indexState = pulmonaryMetastasis[i].column_comment.indexOf("（");
                    var indexEnd = pulmonaryMetastasis[i].column_comment.lastIndexOf("）");
                    var columnComment = pulmonaryMetastasis[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStrHtml += "<span><input type='checkbox' id='pulmonaryMetastasis" + i + "'name='patients' class='" + pulmonaryMetastasis[i].columnName + "' value='" + pulmonaryMetastasis[i].columnName + "," + pulmonaryMetastasis[i].column_comment.replace(columnComment, '') + "'/><label for='pulmonaryMetastasis" + i + "'>" + pulmonaryMetastasis[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span class=\"pull-right-container\">"
                    spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml += " </a>"
                } else {
                    if (pulmonaryMetastasis[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStrHtml += "<a href=\"#\">"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span><input type='checkbox' name='patients' id='pulmonaryMetastasis" + i + "' class='" + pulmonaryMetastasis[i].columnName + "' value='" + pulmonaryMetastasis[i].columnName + "," + pulmonaryMetastasis[i].column_comment.replace('id', '') + "' /><label for='pulmonaryMetastasis" + i + "'>" + pulmonaryMetastasis[i].column_comment.replace('id', '') + "</label></span>"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span class=\"pull-right-container\">"
                        spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStrHtml += " </a>"
                    }
                }
            }

            /**
             * 临床诊断,肺部疾病
             */
            var tumorDiseaseHistory = map.tumorDiseaseHistory;
            for (var i = 0; i < tumorDiseaseHistory.length; i++) {
                if (i == 0) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span><input type='checkbox' id='tumorDiseaseHistory" + i + "' class='ids' name='patients' value='ids,肺部疾病'/><label for='tumorDiseaseHistory" + i + "'> 肺部疾病</label></span>"
                    spanStrHtml += " </a>"
                } else if (tumorDiseaseHistory[i].column_comment.lastIndexOf("id") == -1) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    var indexState = tumorDiseaseHistory[i].column_comment.indexOf("（");
                    var indexEnd = tumorDiseaseHistory[i].column_comment.lastIndexOf("）");
                    var columnComment = tumorDiseaseHistory[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStrHtml += "<span><input type='checkbox' id='tumorDiseaseHistory" + i + "'name='patients' class='" + tumorDiseaseHistory[i].columnName + "' value='" + tumorDiseaseHistory[i].columnName + "," + tumorDiseaseHistory[i].column_comment.replace(columnComment, '') + "'/><label for='medicalHistory" + i + "'>" + tumorDiseaseHistory[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span class=\"pull-right-container\">"
                    spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml += " </a>"
                } else {
                    if (tumorDiseaseHistory[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStrHtml += "<a href=\"#\">"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span><input type='checkbox' name='patients' id='tumorDiseaseHistory" + i + "' class='" + tumorDiseaseHistory[i].columnName + "' value='" + tumorDiseaseHistory[i].columnName + "," + tumorDiseaseHistory[i].column_comment.replace('id', '') + "' /><label for='tumorDiseaseHistory" + i + "'>" + tumorDiseaseHistory[i].column_comment.replace('id', '') + "</label></span>"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span class=\"pull-right-container\">"
                        spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStrHtml += " </a>"
                    }
                }
            }

            /**
             * 临床诊断,肿瘤
             */
            var tumorMarker = map.tumorMarker;
            for (var i = 0; i < tumorMarker.length; i++) {
                if (i == 0) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span><input type='checkbox' id='tumorMarker" + i + "' class='ids' name='patients' value='ids,肿瘤'/><label for='tumorMarker" + i + "'> 肿瘤</label></span>"
                    spanStrHtml += " </a>"
                } else if (tumorMarker[i].column_comment.lastIndexOf("id") == -1) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    var indexState = tumorMarker[i].column_comment.indexOf("（");
                    var indexEnd = tumorMarker[i].column_comment.lastIndexOf("）");
                    var columnComment = tumorMarker[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStrHtml += "<span><input type='checkbox' id='tumorMarker" + i + "'name='patients' class='" + tumorMarker[i].columnName + "' value='" + tumorMarker[i].columnName + "," + tumorMarker[i].column_comment.replace(columnComment, '') + "'/><label for='tumorMarker" + i + "'>" + tumorMarker[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span class=\"pull-right-container\">"
                    spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml += " </a>"
                } else {
                    if (tumorMarker[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStrHtml += "<a href=\"#\">"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span><input type='checkbox' name='patients' id='tumorMarker" + i + "' class='" + tumorMarker[i].columnName + "' value='" + tumorMarker[i].columnName + "," + tumorMarker[i].column_comment.replace('id', '') + "' /><label for='tumorMarker" + i + "'>" + tumorMarker[i].column_comment.replace('id', '') + "</label></span>"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span class=\"pull-right-container\">"
                        spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStrHtml += " </a>"
                    }
                }
            }

            /**
             * 临床诊断,骨转移
             */
            var boneMetastases = map.boneMetastases;
            for (var i = 0; i < boneMetastases.length; i++) {
                if (i == 0) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span><input type='checkbox' id='boneMetastases" + i + "' class='ids' name='patients' value='ids,骨转移'/><label for='boneMetastases" + i + "'> 骨转移</label></span>"
                    spanStrHtml += " </a>"
                } else if (boneMetastases[i].column_comment.lastIndexOf("id") == -1) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    var indexState = boneMetastases[i].column_comment.indexOf("（");
                    var indexEnd = boneMetastases[i].column_comment.lastIndexOf("）");
                    var columnComment = boneMetastases[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStrHtml += "<span><input type='checkbox' id='boneMetastases" + i + "'name='patients' class='" + boneMetastases[i].columnName + "' value='" + boneMetastases[i].columnName + "," + boneMetastases[i].column_comment.replace(columnComment, '') + "'/><label for='tumorMarker" + i + "'>" + boneMetastases[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span class=\"pull-right-container\">"
                    spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml += " </a>"

                } else {
                    if (boneMetastases[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStrHtml += "<a href=\"#\">"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span><input type='checkbox' name='patients' id='boneMetastases" + i + "' class='" + boneMetastases[i].columnName + "' value='" + boneMetastases[i].columnName + "," + boneMetastases[i].column_comment.replace('id', '') + "' /><label for='boneMetastases" + i + "'>" + boneMetastases[i].column_comment.replace('id', '') + "</label></span>"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span class=\"pull-right-container\">"
                        spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStrHtml += " </a>"
                    }
                }
            }

            /**
             * 临床诊断,脑转移
             */
            var brainMetastases = map.brainMetastases;
            for (var i = 0; i < brainMetastases.length; i++) {
                if (i == 0) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span><input type='checkbox' id='brainMetastases" + i + "' class='ids' name='patients' value='ids,脑转移'/><label for='brainMetastases" + i + "'> 脑转移</label></span>"
                    spanStrHtml += " </a>"
                } else if (brainMetastases[i].column_comment.lastIndexOf("id") == -1) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    var indexState = brainMetastases[i].column_comment.indexOf("（");
                    var indexEnd = brainMetastases[i].column_comment.lastIndexOf("）");
                    var columnComment = brainMetastases[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStrHtml += "<span><input type='checkbox' id='brainMetastases" + i + "'name='patients' class='" + brainMetastases[i].columnName + "' value='" + brainMetastases[i].columnName + "," + brainMetastases[i].column_comment.replace(columnComment, '') + "'/><label for='brainMetastases" + i + "'>" + brainMetastases[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span class=\"pull-right-container\">"
                    spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml += " </a>"
                } else {
                    if (brainMetastases[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStrHtml += "<a href=\"#\">"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span><input type='checkbox' name='patients' id='brainMetastases" + i + "' class='" + brainMetastases[i].columnName + "' value='" + brainMetastases[i].columnName + "," + brainMetastases[i].column_comment.replace('id', '') + "' /><label for='brainMetastases" + i + "'>" + brainMetastases[i].column_comment.replace('id', '') + "</label></span>"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span class=\"pull-right-container\">"
                        spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStrHtml += " </a>"
                    }
                }
            }

            /**
             * 临床诊断,肝转移
             */
            var liverMetastasis = map.liverMetastasis;
            for (var i = 0; i < liverMetastasis.length; i++) {
                if (i == 0) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span><input type='checkbox' id='liverMetastasis" + i + "' class='ids' name='patients' value='ids,肝转移'/><label for='liverMetastasis" + i + "'> 肝转移</label></span>"
                    spanStrHtml += " </a>"
                } else if (liverMetastasis[i].column_comment.lastIndexOf("id") == -1) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    var indexState = liverMetastasis[i].column_comment.indexOf("（");
                    var indexEnd = liverMetastasis[i].column_comment.lastIndexOf("）");
                    var columnComment = liverMetastasis[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStrHtml += "<span><input type='checkbox' id='liverMetastasis" + i + "'name='patients' class='" + liverMetastasis[i].columnName + "' value='" + liverMetastasis[i].columnName + "," + liverMetastasis[i].column_comment.replace(columnComment, '') + "'/><label for='liverMetastasis" + i + "'>" + liverMetastasis[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span class=\"pull-right-container\">"
                    spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml += " </a>"
                } else {
                    if (liverMetastasis[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStrHtml += "<a href=\"#\">"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span><input type='checkbox' name='patients' id='liverMetastasis" + i + "' class='" + liverMetastasis[i].columnName + "' value='" + liverMetastasis[i].columnName + "," + liverMetastasis[i].column_comment.replace('id', '') + "' /><label for='liverMetastasis" + i + "'>" + liverMetastasis[i].column_comment.replace('id', '') + "</label></span>"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span class=\"pull-right-container\">"
                        spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStrHtml += " </a>"
                    }
                }
            }

            /**
             * 临床诊断,淋巴结转移
             */
            var lymphNodeMetastasis = map.lymphNodeMetastasis;
            for (var i = 0; i < lymphNodeMetastasis.length; i++) {
                if (i == 0) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span><input type='checkbox' id='lymphNodeMetastasis" + i + "' class='ids' name='patients' value='ids,淋巴结转移'/><label for='lymphNodeMetastasis" + i + "'> 淋巴结转移</label></span>"
                    spanStrHtml += " </a>"
                } else if (lymphNodeMetastasis[i].column_comment.lastIndexOf("id") == -1) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    var indexState = lymphNodeMetastasis[i].column_comment.indexOf("（");
                    var indexEnd = lymphNodeMetastasis[i].column_comment.lastIndexOf("）");
                    var columnComment = lymphNodeMetastasis[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStrHtml += "<span><input type='checkbox' id='lymphNodeMetastasis" + i + "'name='patients' class='" + lymphNodeMetastasis[i].columnName + "' value='" + lymphNodeMetastasis[i].columnName + "," + lymphNodeMetastasis[i].column_comment.replace(columnComment, '') + "'/><label for='lymphNodeMetastasis" + i + "'>" + lymphNodeMetastasis[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span class=\"pull-right-container\">"
                    spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml += " </a>"
                } else {
                    if (lymphNodeMetastasis[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStrHtml += "<a href=\"#\">"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span><input type='checkbox' name='patients' id='lymphNodeMetastasis" + i + "' class='" + lymphNodeMetastasis[i].columnName + "' value='" + lymphNodeMetastasis[i].columnName + "," + lymphNodeMetastasis[i].column_comment.replace('id', '') + "' /><label for='lymphNodeMetastasis" + i + "'>" + lymphNodeMetastasis[i].column_comment.replace('id', '') + "</label></span>"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span class=\"pull-right-container\">"
                        spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStrHtml += " </a>"
                    }
                }
            }

            /**
             * 临床诊断,其他转移
             */
            var otherTransfer = map.otherTransfer;
            for (var i = 0; i < otherTransfer.length; i++) {
                if (i == 0) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span><input type='checkbox' id='otherTransfer" + i + "' class='ids' name='patients' value='ids,其他转移'/><label for='otherTransfer" + i + "'> 其他转移</label></span>"
                    spanStrHtml += " </a>"
                } else if (otherTransfer[i].column_comment.lastIndexOf("id") == -1) {
                    spanStrHtml += "<a href=\"#\">"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    var indexState = otherTransfer[i].column_comment.indexOf("（");
                    var indexEnd = otherTransfer[i].column_comment.lastIndexOf("）");
                    var columnComment = otherTransfer[i].column_comment.substring(indexState, indexEnd + 1);
                    spanStrHtml += "<span><input type='checkbox' id='otherTransfer" + i + "'name='patients' class='" + otherTransfer[i].columnName + "' value='" + otherTransfer[i].columnName + "," + otherTransfer[i].column_comment.replace(columnComment, '') + "'/><label for='otherTransfer" + i + "'>" + otherTransfer[i].column_comment.replace(columnComment, '') + "</label></span>"
                    spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml += "<span class=\"pull-right-container\">"
                    spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml += " </a>"
                } else {
                    if (otherTransfer[i].column_comment.indexOf("patient_id") == -1) {
                    } else {
                        spanStrHtml += "<a href=\"#\">"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span><input type='checkbox' name='patients' id='otherTransfer" + i + "' class='" + otherTransfer[i].columnName + "' value='" + otherTransfer[i].columnName + "," + otherTransfer[i].column_comment.replace('id', '') + "' /><label for='otherTransfer" + i + "'>" + otherTransfer[i].column_comment.replace('id', '') + "</label></span>"
                        spanStrHtml += "<i class=\"fa fa-folder\"></i>"
                        spanStrHtml += "<span class=\"pull-right-container\">"
                        spanStrHtml += "<i class=\"fa fa-angle-left pull-right\"></i>"
                        spanStrHtml += " </a>"
                    }
                }
            }
            $("#diagnosticInformationSheetId").html(spanStrHtml);

            /**
             * 评分表
             */
            var spanStrHtml2 = "";
            var score = map.score;
            for (var i = 0; i < score.length; i++) {
                if (i == 0) {
                    spanStrHtml2 += "<a href=\"#\">"
                    spanStrHtml2 += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml2 += "<span><input type='checkbox' id='score" + i + "' class='ids' name='patients' value='ids,评分表'/><label for='score" + i + "'> 评分表</label></span>"
                    spanStrHtml2 += " </a>"
                } else if (score[i].column_comment.lastIndexOf("id") == -1) {
                    spanStrHtml2 += "<a href=\"#\">"
                    spanStrHtml2 += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml2 += "<span><input type='checkbox' id='score" + i + "' class='" + score[i].columnName + "' name='patients' value='" + score[i].columnName + "," + score[i].column_comment + "'/><label for='score" + i + "'>" + score[i].column_comment + "</label></span>"
                    spanStrHtml2 += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml2 += "<span class=\"pull-right-container\">"
                    spanStrHtml2 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml2 += " </a>"
                } else {
                    spanStrHtml2 += "<a href=\"#\">"
                    spanStrHtml2 += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml2 += "<span><input type='checkbox' name='patients' id='score" + i + "' class='" + score[i].columnName + "' value='" + score[i].columnName + "," + score[i].column_comment.replace('id', '') + "' /><label for='score" + i + "'>" + score[i].column_comment.replace('id', '') + "</label></span>"
                    spanStrHtml2 += "<i class=\"fa fa-folder\"></i>"
                    spanStrHtml2 += "<span class=\"pull-right-container\">"
                    spanStrHtml2 += "<i class=\"fa fa-angle-left pull-right\"></i>"
                    spanStrHtml2 += " </a>"
                }
            }
            $("#scoreId").append(spanStrHtml2);


        }
    })
})
